package cn.yjr.fragment;

import org.json.JSONException;
import org.json.JSONObject;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.LinearLayout.LayoutParams;
import cn.edu.pku.tools.FileHelper;
import cn.edu.pku.tools.SharedPreferencesHelper;
import cn.liuyi.weiyi.R;

import com.actionbarsherlock.app.SherlockFragment;

/**
 * @author vector
 *
 */
@SuppressLint("ValidFragment")
public class BroadFragment extends SherlockFragment {
	View view;
	Context context;
	SharedPreferencesHelper helper;
	JSONObject doctor;
	TextView broad_show_tv;
	String notice;
	public BroadFragment(JSONObject data){
		doctor = data;
		try {
			notice = doctor.getString("notice");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    	view = inflater.inflate(R.layout.tab_broad,container, false);
	    this.context = getActivity();
	    this.helper = new SharedPreferencesHelper(this.context);
	    broad_show_tv = (TextView) view.findViewById(R.id.broad_show_tv);
	    broad_show_tv.setText(notice);
	    return this.view;
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
    }
}
